﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="OrdersForCustomers.aspx.cs" Inherits="Deliver_OrdersForCustomers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <h2>
        分行快递给客户
    </h2>
     <div class="searchcondition">
        <table class="searchtb">
            <tr>
                <td>业务类型<asp:DropDownList ID="DelegateList" runat="server" 
                        AppendDataBoundItems="True" DataSourceID="ObjectDataSource2" 
                        DataTextField="DelegateName" DataValueField="DelegateType" Height="16px">
                    <asp:ListItem Value="999">所有业务</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    注册地
                    <asp:DropDownList ID="RegionList" runat="server" AppendDataBoundItems="True" 
                        DataSourceID="SqlDataSource2" DataTextField="RegionName" 
                        DataValueField="RegionID">
                        <asp:ListItem Value="999">所有注册地</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>业务员<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </td>
                <td>&nbsp;</td>
            </tr>
        </table>
        <div style="text-align: right;margin: 3px;">
            
            <asp:Button ID="Button1" runat="server" Text="查询" 
                        onclick="Button1_Click" /></div></div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CssClass="commongv" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="OrderID" HeaderText="OrderID" 
                SortExpression="OrderID" />
            <asp:BoundField DataField="支付状态" HeaderText="支付状态" ReadOnly="True" 
                SortExpression="支付状态" />
            <asp:BoundField DataField="下单时间" HeaderText="下单时间" SortExpression="下单时间" />
            <asp:BoundField DataField="公司英文名" HeaderText="公司英文名" SortExpression="公司英文名" />
            <asp:BoundField DataField="注册地" HeaderText="注册地" SortExpression="注册地" />
            <asp:BoundField DataField="业务员" HeaderText="业务员" SortExpression="业务员" />
            <asp:BoundField DataField="货币类型" HeaderText="货币类型" ReadOnly="True" 
                SortExpression="货币类型" />
            <asp:BoundField DataField="金额" HeaderText="金额" SortExpression="金额" />
            <asp:BoundField DataField="业务类型" HeaderText="业务类型" SortExpression="业务类型" />
            <asp:HyperLinkField HeaderText="操作" Text="处理" DataNavigateUrlFields="OrderID" DataNavigateUrlFormatString="HandleOrderForCustomer.aspx?key={0}" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:KOONCRMDB %>" 
        SelectCommand="Order_BranchDeliver" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="BranchID" Name="branchID" PropertyName="Value" 
                Type="Int32" />
            <asp:ControlParameter ControlID="DelegateList" Name="delegateID" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="RegionList" Name="regionID" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="TextBox1" ConvertEmptyStringToNull="False" 
                Name="empolyeeName" PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:HiddenField ID="BranchID" runat="server" />
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:KOONCRMDB %>" 
        SelectCommand="SELECT [RegionName], [RegionID] FROM [Region]"></asp:SqlDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetDelegates" 
        TypeName="Koonsoft.HYCRM.BLL.DelegateBLL"></asp:ObjectDataSource>
</asp:Content>
